package com.example.demo1.controller;

import com.example.demo1.Entity.AdminCourse;
import com.example.demo1.service.AdminCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;


public class AdminCourseController {
    @Autowired
    private AdminCourseService adminCourseService;

    @PostMapping("/AdminCourse")
    public void inputAdminCourse( @RequestParam Long courseid,
                                  @RequestParam String coursename,
                                  @RequestParam String teachername){
        AdminCourse adminCourse =adminCourseService.AdminCourseSet(coursename,courseid,teachername);
        //adminCourseService.getAdminCourseByCourseId(coursename);
        adminCourseService.save_data(adminCourse);
    }
}
